package com.github;

import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import com.alibaba.dubbo.config.spring.context.annotation.EnableDubbo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

import java.io.IOException;

/**
 * spring boot 方式启动dubbo
 * @author jack
 */
//@EnableDubbo
@SpringBootApplication(exclude = DruidDataSourceAutoConfigure.class)
public class SmartDubboConsumerApplication extends SpringBootServletInitializer {

    final  static Logger logger = LoggerFactory.getLogger(SmartDubboConsumerApplication.class);

    public static void main(String[] args)  {
        SpringApplication.run(SmartDubboConsumerApplication.class, args);
    }

    /**
     *  war包方式
     * @param builder
     * @return
     */
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        logger.info("############   SmartDubboConsumerApplication  启动");
        return super.configure(builder);
    }
}
